课程主页:https://www.coursera.org/learn/dsp1

这一讲介绍了Digital Signal Processing: the Basics。

介绍

数字信号

信号用来描述一些物理现象,本课程主要讨论数字信号,其特点为

  • 离散时间
  • 离散振幅

现实中的信号实际上是连续的,离散信号对于连续信号的逼近利用采样定理可以保证

数据传输

数据传输的理想情形如下:

实际中信号传播一定有噪声

如果使用上图的形式解码则结果如下:

这样会产生非常大的误差,如果使用多个解码器更是如此

在数字信号中可以对上述问题进行简单处理,方法是使用sgn函数:

离散时间信号

定义

离散时间信号:复数序列

  • 一维(目前为止)
  • 记号:$x [n]$
  • $x: \mathbb{Z} \rightarrow \mathbb{C}$
  • $n$是时间维度
  • 分析:定期测量
  • 合成:生成样本

例子

delta

unit step

四种信号类型

  • 有限长
  • 无限长
  • 周期
  • 紧支集
有限长
  • $x[n], \quad n=0,1, \ldots, N-1$
  • 向量形式:$\mathbf{x}=\left[x_{0} x_{1} \ldots x_{N-1}\right]^{T}$
无限长
  • $x[n], \quad n \in \mathbb{Z}$
周期信号
  • $\tilde{x}[n]=\tilde{x}[n+k N], \quad n, k, N \in \mathbb{Z}$
  • 和长度为$N$的信号信息相同
紧支集

基本操作

能量和功率

能量

功率

复指数

周期性

复指数信号是周期信号,当且仅当

数字和物理频率

  • 采样的时间间隔为$T_s$

  • $ M $个样本的周期$ \longrightarrow $ $ MT_ {s} $秒的周期

  • 实际频率

DSP的构建模块

来看一个具体例子:

Karplus-Strong

利用上述模块可以生成简单的音乐,方法如下:

  • 建立延迟为$ M $的递归循环
  • 选择一个仅在$ 0 \leq n <M $为非零的信号$ \bar {x} [n] $
  • 选择一个衰减因子$\alpha$
  • 向系统输入$ \bar {x} [n] $
  • 播放输出

该方法被称为Karplus-Strong算法。

习题

1

(Difficulty: $\star$) What are the advantages of using digital signals over analog ones? Choose the correct answer(s).

  • Digital signals are more robust to noise.
  • Digital signals can be easily stored.
  • Physical quantities are naturally represented by digital signals.
  • Digital signals contains more information than analog ones.

1,2

2

(Difficulty: $\star$) Amongst the signals listed below, select those that are in digital format.

  • Music recorded on a vinyl record.
  • JPEG image on a website.
  • Music recorded on a CD.
  • A handwritten book manuscript.

2,3

3

Consider the following finite support signal:

Consider also its periodic repetition

Compute the energy of $x[n]$

4

Consider the same signals as the previous question. Compute the power of $x[n] $.

5

Consider the same signals as the previous question. Compute the energy of $y[n] $.

6

Consider the same signals as the previous question. Compute the power of $y[n] $.

注意到我们有

所以

7

Consider the signal

Consider now its moving average, i.e. the signal

Select the correct expressions from the options below.

  • $y[n]=\delta[n]+2 \delta[n-1]+5 \delta[n-2]+3 \delta[n-3]$
  • The output for $n \geq 4$ is always zero.

所以答案为2

8

A music song recorded in a studio is stored as a digital sequence on a CD. The analog signal representing the music is 2 minutes long and is sampled at a frequency $f_{s}=44100 s^{-1}$. How many samples should be stored on the CD? Write the number of samples without commas or dots. Assume that the audio file is mono, or in other words, single channel.

9

Given the following filter

What is the input-output relationship?

  • $y[n]=b(a x[n]+x[n-1])-(c+1) x[n-3] $
  • $y[n]=(b a x[n]+x[n-1])+(c x[n-3]+x[n-4]) $
  • $y[n]=a b x[n]+b x[n-1]+c x[n-3]-x[n-4]$
  • $y[n]=b(a x[n]+x[n-1])-(c x[n-3]+x[n-4])$

根据上图可得

所以选4

10

What is the minimum period $P$ (in samples) of the signal $e^{j(M / N) 2 \pi n}$ for $M=1, N=3$

注意$n$为整数,所以答案为

所以答案为

11

What is the minimum period $P$ (in samples) of the signal $e^{j(M / N) 2 \pi n}$ for $M=5, N=7$

12

What is the minimum period $P$ (in samples) of the signal $e^{j(M / N) 2 \pi n}$ for $M=35, N=15$